// ============================== 组织树请求体 ============================== //

export class TreeReq {
  constructor() {
    this.obj = {
      comReq: undefined,
      comQuery: undefined,
    }
  }

  toObject() {
    return this.obj
  }

  setComQuery(comQuery) {
    if(comQuery && comQuery.toObject) this.obj.comQuery = comQuery.toObject()
  }
}

// ============================== 组织结构体 ============================== //

export class OrganDto {
  constructor() {
    this.obj = {
      id: '',
      tenantNo: 0,
      organName: '',
      status: 0,
      children: [],
    }
  }

  toObject() {
    return this.obj
  }

  setId(id) {
    this.obj.id = id
  }

  setTenantNo(tenantNo) {
    this.obj.tenantNo = tenantNo
  }

  setOrganName(organName) {
    this.obj.organName = organName
  }

  setStatus(status) {
    this.obj.status = status
  }

  setChildren(children) {
    this.obj.children = children
  }
}
